<!DOCTYPE html>
<html lang="en">
    <head>
        <title></title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="./vue2.js"></script>
    </head>
    <body>
        <div id="app">
            <input type="text" name="" id="" v-model="firstName">
            <input type="text" name="" id=""  v-model="lastName">

            <p>p标签的值：{{firstName}}-----{{lastName}}</p>
            <p>全名：{{fullName}}</p>
        </div>
        <script>
            var vm = new Vue({
                el: '#app',
                data: {
                    msg:"123",
                    firstName:" ",
                    lastName:" "
                },
                computed:{
                    fullName(){
                        return this.firstName+this.lastName
                    }
                }
            })
        </script>
    </body>
</html>